package com.xnj.data_stream_demo;

import java.io.DataInputStream;
import java.io.FileInputStream;

// 数据输入流
public class Test2 {
    public static void main(String[] args) {
        try (
                DataInputStream dis = new DataInputStream(new FileInputStream("src/data.txt"))
        ) {
            System.out.println(dis.readInt());
            System.out.println(dis.readDouble());
            System.out.println(dis.readBoolean());
            System.out.println(dis.readUTF());

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
